import request from '@/axios';

export const getList = (current, size, params) => {
    return request({
        url: '/api/blade-anwise/prod/material_summary/list',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

export const requireList = (current, size, params) => {
    return request({
        url: '/api/blade-anwise/prod/material_summary/requireList',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}


export const getDetail = (id) => {
  return request({
    url: '/api/blade-anwise/prod/material_summary/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
    return request({
        url: '/api/blade-anwise/prod/material_summary/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const backData = (id) => {
    return request({
        url: '/api/blade-anwise/prod/material_summary/backData',
        method: 'post',
        params: {
            id,
        }
    })
}

export const closeData = (id) => {
    return request({
        url: '/api/blade-anwise/prod/material_summary/closeData',
        method: 'post',
        params: {
            id,
        }
    })
}

export const add = (row) => {
  return request({
    url: '/api/blade-anwise/prod/material_summary/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-anwise/prod/material_summary/submit',
    method: 'post',
    data: row
  })
}

